package com.lucky.ebidding.service.interfaces;

import com.lucky.ebidding.model.ScoreInfo;
import com.lucky.ebidding.model.ScoreTotal;
import com.lucky.ebidding.model.User;

import java.util.List;

/**
 * ClassName:ScoreServiceI
 * Package:com.lucky.ebidding.service.interfaces
 * Description:
 *
 * @Date:2020/5/20 10:12
 * @Author:857251389@qq.com
 */
public interface ScoreServiceI {

    /**
     * 插入分数
     * @param zbId
     * @param tbId
     * @param score
     * @param user
     * @return
     */
    int insert(Integer zbId, Integer tbId, Integer score, User user);

    /**
     * 通过专家id 和投标项目id 查询初评分表 然后查出评分
     * @param id
     * @param expertId
     * @return
     */
    Integer selectPfByTbIdAndExpertId(Integer id, Integer expertId);

    /**
     * 对同一个投标的评分进行处理
     * @param scoreInfoList
     * @return
     */
    ScoreTotal scoreTotal(List<ScoreInfo> scoreInfoList);

    /**
     * 通过tbId 查询该投标的所有评分表
     * @param tbId
     * @return
     */
    List<ScoreInfo> selectInfoByTbId(Integer tbId);
}
